home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 1.5 KB | 60 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWTraceT.h
- // Release Version: $ 1.0d1 $
- //
- // Creation Date: 3/28/94
- //
- // Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #if defined(FW_DEBUG) && !defined(FWTRACET_H)
- #define FWTRACET_H
-
- #ifndef FWPRITAS_H
- #include "FWPriTas.h"
- #endif
-
- #ifndef FWSTRACE_H
- #include "FWSTrace.h"
- #endif
-
- //========================================================================================
- // CLASS FW_CPrivTraceTaskGlobals
- //========================================================================================
-
- class FW_CPrivTraceTaskGlobals
- {
-
- public:
-
- static void Initialize(FW_SPrivTraceGlobals& globals);
- static void Terminate();
-
- static FW_SPrivTraceGlobals& GetTraceGlobals();
-
- private:
-
- enum {kTraceTaskGlobalsOffset = 6};
-
- ~FW_CPrivTraceTaskGlobals();
- FW_CPrivTraceTaskGlobals();
-
- };
-
- //----------------------------------------------------------------------------------------
- // FW_CPrivTraceTaskGlobals::GetTraceGlobals
- //----------------------------------------------------------------------------------------
-
- inline FW_SPrivTraceGlobals& FW_CPrivTraceTaskGlobals::GetTraceGlobals()
- {
- FW_SPrivTraceGlobals *globals = (FW_SPrivTraceGlobals*)
- FW_CPrivTaskGlobals::GetTaskGlobals(kTraceTaskGlobalsOffset);
- if (globals->gDebugConsole == 0)
- Initialize(*globals);
- return *globals;
- }
-
- #endif
-